class CreateTickets < ActiveRecord::Migration
  def self.up
    create_table :tickets do |t|
      t.column :monto, :float, :null=>false
      t.column :vto, :date, :null=>false #vencimiento
      t.column :pago, :boolean, :default=>false
      t.column :plan_id, :integer, :null=>false
      t.column :forma_id, :integer, :null=>false
    end

    add_index :tickets, :plan_id
    add_index :tickets, :forma_id
  end
  
  def self.down
    drop_table :tickets
  end
end
